package pri.hillchen.springboot.shiro.service.impl;

import org.springframework.stereotype.Service;
import pri.hillchen.springboot.shiro.common.service.impl.BaseServiceImpl;
import pri.hillchen.springboot.shiro.entity.Role;
import pri.hillchen.springboot.shiro.mapper.RoleMapper;
import pri.hillchen.springboot.shiro.service.RoleService;

import java.util.List;
import java.util.Set;

/**
 * Created by hillchen on 2017/10/17 0017.
 */
@Service
public class RoleServiceImpl extends BaseServiceImpl<RoleMapper,Role> implements  RoleService {
    @Override
    public List<Role> queryUserRole(String userName) {
        return baseMapper.queryUserRole(userName);
    }

    @Override
    public void assignPermission(Integer roleId, Set<Integer> permissionIds) {
        baseMapper.assignPermission(roleId,permissionIds);
    }
}
